package web.form;

import java.util.ArrayList;
import java.util.List;
import org.apache.commons.collections.FactoryUtils;
import org.apache.commons.collections.list.LazyList;
import entities.Status;


public class SheetView {

	private List<Block> blocks;
	private String title;
	private String code;
	private String type;
	private String typeLabel;
	private Status status;

	
	@SuppressWarnings("unchecked")
	public SheetView() {
		blocks = LazyList.decorate(new ArrayList<Block>(), FactoryUtils.instantiateFactory(Block.class)); 
	}

	public SheetView(List<Block> blocks, String code, String type, String typeLabel,
			String title, Status status) {
		this.blocks = blocks;
		this.code = code;
		this.type = type;
		this.typeLabel = typeLabel;
		this.title = title;
		this.setStatus(status);
	}
	
	public List<Block> getBlocks() {
		return blocks;
	}

	public void setBlocks(List<Block> blocks) {
		this.blocks = blocks;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getTypeLabel() {
		return typeLabel;
	}

	public void setTypeLabel(String typeLabel) {
		this.typeLabel = typeLabel;
	}

	public Status getStatus() {
		return status;
	}

	public void setStatus(Status status) {
		this.status = status;
	}
	
	
}
